{__NOLAYOUT__}
{{include file="public:top"}}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my_form" name="my_form" class="am-form tpl-form-line-form" method="post">

                    <div class="widget-body">6
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">编辑菜单</div>
                            </div>
                            <div class="am-form-group" >
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">栏目名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="title"
                                           value="<?=$detail['title']?>" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">所属栏目 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <select name="pid" required
                                            data-am-selected="{searchBox: 1, btnSize: 'sm',  placeholder:'请选择菜单分类'}">
                                            <option value="0" <?php if($detail['pid']== 0):?>selected <?php endif;?>>
                                              顶级菜单
                                            </option>
                                        <?php if (isset($categorylist)): foreach ($categorylist as $first): ?>
                                            <option value="<?= $first['id'] ?>"
                                                    <?php if($detail['pid']== $first['id']):?>selected <?php endif;?>
                                            >
                                                <?= $first['title'] ?>
                                            </option>

                                        <?php endforeach; endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="am-form-group" >
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">控制器名 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="index"
                                           value="<?=$detail['index']?>" required>
                                </div>
                            </div>
                            <div class="am-form-group" >
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">方法名称 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" placeholder="控制器/方法" class="tpl-form-input" name="name"
                                           value="<?=$detail['name']?>" required >
                                </div>
                            </div>
                            <div class="am-form-group" >
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label ">Icon图标 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input" name="icon"
                                           value="<?=$detail['icon']?>" >
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">显示状态 </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="status" value="1"
                                           data-am-ucheck <?php if($detail['status']==1):?>checked<?php endif;?>
                                           required>
                                    显示
                                </label>
                                <label class="am-radio-inline ">
                                    <input type="radio" name="status" value="0" <?php if($detail['status']==0):?>checked<?php endif;?>
                                           data-am-ucheck
                                    >
                                    隐藏
                                </label>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">页面形式 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="is_windows" value="0" data-am-ucheck <?php if($detail['is_windows']==0):?>checked<?php endif;?>>
                                        单页面
                                    </label>
                                    <label class="am-radio-inline">
                                        <input id="top" type="radio" name="is_windows" value="1" <?php if($detail['is_windows']==1):?>checked<?php endif;?> data-am-ucheck>
                                        <span class="am-link-muted">弹窗页面</span>
                                    </label>
                                </div>
                            </div>
                            <script>
                                $(function(){
                                    $('input[name="is_windows"]').change(function(){
                                        if($(this).val()==1){
                                            $('.spec-group-add').show();
                                        }else{
                                            $('.spec-group-add').hide();
                                        }
                                    });

                                })
                            </script>
                            <!-- 弹窗：表单 -->
                            <div class="spec-group-add"  style="display: none">
                                <div class="spec-group-add-item am-form-group">
                                    <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">宽 度 </label>
                                    <div class="am-u-sm-9 am-u-end">
                                        <input type="text" class="tpl-form-input" name="width"
                                               value="" required placeholder="请输入宽度" value="<?=$detail['width']?>">
                                    </div>
                                </div>
                                <div class="spec-group-add-item am-form-group">
                                    <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">高 度 </label>
                                    <div class="am-u-sm-9 am-u-end">
                                        <input type="text" class="tpl-form-input" name="height"
                                               value="" required placeholder="请输入高度" value="<?=$detail['height']?>">
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">是否顶部 </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="is_top" value="1"
                                           data-am-ucheck <?php if($detail['is_top']==1):?>checked<?php endif;?>
                                           required>
                                    是
                                </label>
                                <label class="am-radio-inline ">
                                    <input type="radio" name="is_top" value="0"
                                           data-am-ucheck <?php if($detail['is_top']==0):?>checked<?php endif;?>
                                    >
                                    否
                                </label>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


